package com.andeveloper.springdemo.controller.news;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/news")
public class NewsController {
	
	@ResponseBody
	@RequestMapping("/{column}/{type}")
	public String getNewsList(@PathVariable String column, @PathVariable String type) {
		return "new:" + column + ":" + type;
	}
	
	@ResponseBody
	@RequestMapping("/detail/{newId}")
	public String getNewsDetail(@PathVariable String newId) {
		return "new:detail:" + newId;
	}
}
